package StructuralPattern.Facade;

import StructuralPattern.Facade.Subsystem.ComplexMode;
import StructuralPattern.Facade.Subsystem.ModeA;
import StructuralPattern.Facade.Subsystem.ModeB;
import StructuralPattern.Facade.Subsystem.ModeC;

/**
 * @Classname : Facade
 * @Description : 门面对象（高权限）
 * 若模块A、B、C表示一个子系统，当前门面对象提供对该子系统的访问
 * @Author : chentianyu
 * @Date 2023/2/19 22:32
 */


public class Facade {

    private ModeA modeA = new ModeA();
    private ModeB modeB = new ModeB();
    private ModeC modeC = new ModeC();
    private ComplexMode complexMode = new ComplexMode();

    public void methodA() {
        this.modeA.methodA();
    }

    public void methodB() {
        this.modeB.methodB();
    }

    public void methodC() {
        this.modeC.methodC();
    }

    public void complexMethod() {
        this.complexMode.ComplexMethod();
    }

}
